/**人员费、劳务费 */
<template>
  <div>
    <el-form :model="queryForm" ref='formName' :rules="rules" >
      <!-- <el-row type="flex" class="row-bg" justify="end">
        <el-input disabled v-model="valFee" style="width:20%"></el-input>元
      </el-row> -->
      <div>
        <el-input disabled v-model="valFee" style="width:20%"></el-input>元
      </div>
      <table  class="personal">
          <tr v-for="(item,index) in queryForm.tableList" :key='index'>
            <template v-if="index !== 0">
               <td class="courseTemplate-td1">
                    <label>{{item.label}}：</label>
                    <el-tooltip placement="bottom" effect="light">
                      <div slot="content">
                      <!-- 竞教结合课程名称，或者相关度高的课程名称， -->
                      {{item.title}}
                      </div>
                      <img :src="images" alt="" >
                    </el-tooltip>
                </td>
                <td class="courseTemplate-td2">
                  <el-button type="text"   @click="btnAssignment(index,item.label)">{{item.value}}</el-button>
                </td>
            </template>
          </tr>
      </table>
      <el-dialog
        :title="compile+'-'+labeList"
        :visible.sync="dialogVisible"
        width="50%"
        :close-on-click-modal='false'
        :before-close="handleClose">
        <!-- <el-button type="text" :disabled="compile=='审核'||compile=='查看'"  @click="addMore">{{$t('添加更多')}}</el-button> -->
        <el-row style="margin-bottom: 10px;" type="flex" class="row-bg" justify="end">
          <el-button type="primary"  :disabled="compile==='审核'||compile==='查看'"  @click="addMore">添加更多</el-button>
        </el-row>
        <elTableList :tableData='tableData' ref='table' :requireInput="requireInput" @change-addMore='changeAddMore' :index='index' :labeList='labeList'  @valFee-click='valFeeClick' :compile='compile' @change-tab='changeClick'></elTableList>
        <span slot="footer" class="dialog-footer">
          <el-button @click="handleClose">取消</el-button>
          <el-button :disabled="compile==='审核'||compile==='查看'" type="primary" @click="confirm">确定</el-button>
        </span>
      </el-dialog>
      <!-- <h2 style="color:#101010" >{{$t('projectDeclara.expenditure')}}</h2>
      <edu-table
        :pagination="false"
        :order="false" 
        :selection="false"
        :tooltipEffect="tooltipEffect"
        stripe
        :data="queryForm.studentListOne"
        size="mini"
      >
        <edu-table-column :label="$t('projectDeclara.preparing')" prop="personnelCost">
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListOne.' + scope.$index + '.personnelCost'" label-width="0" :rules="rulesOne.personnelCost" >
                <el-input 
                    v-model.trim="scope.row.personnelCost" 
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.personnelCost}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.jobContent')" prop="workContent" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListOne.' + scope.$index + '.workContent'" label-width="0" :rules="rulesOne.workContent" >
                <el-input 
                    v-model.trim="scope.row.workContent" 
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.workContent}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.money')" prop="budget" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListOne.' + scope.$index + '.budget'" label-width="0" :rules="rulesOne.budget" >
                <el-input 
                      v-model.trim="scope.row.budget" 
                      clearable
                      maxlength="9" >
                  </el-input>
              </el-form-item>
              <span v-else>{{scope.row.budget}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.estimatBasis')" prop="remark" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListOne.' + scope.$index + '.remark'" label-width="0" :rules="rulesOne.remark" >
                <el-input
                    v-model.trim="scope.row.remark" 
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.remark}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('common.text.operation')" fit width="150">
          <template slot-scope="props">
            <el-button type="text" v-if="!props.row.flag"   @click="internAssignment(props.row,props.$index, 'one')">{{$t('projectDeclara.save')}}</el-button>
            <el-button type="text" v-if="props.row.flag"  @click="submitResults(props.row,props.$index, 'one')">{{$t('projectDeclara.compile')}}</el-button>
            <el-button type="text" v-if="props.row.flag"  @click="selectEvalResubmit(props.row,props.$index, 'one')">{{$t('projectDeclara.delete')}}</el-button>
          </template>
        </edu-table-column>
      </edu-table> -->
      <!-- <h2 style="color:#101010" >{{$t('projectDeclara.personnel')}}</h2>
      <edu-table
        :pagination="false"
        :order="false"
        :selection="false"
        :tooltipEffect="tooltipEffect"
        stripe
        :data="queryForm.studentListTow"
        size="mini"
      >
        <edu-table-column :label="$t('projectDeclara.preparing')" prop="personnelCost" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListTow.' + scope.$index + '.personnelCost'" label-width="0" :rules="rulesTow.personnelCost" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.personnelCost" 
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.personnelCost}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.jobContent')" prop="workContent" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListTow.' + scope.$index + '.workContent'" label-width="0" :rules="rulesTow.workContent" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.workContent"
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.workContent}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.money')" prop="budget" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListTow.' + scope.$index + '.budget'" label-width="0" :rules="rulesTow.budget" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.budget"
                    clearable
                    maxlength="9" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.budget}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.estimatBasis')" prop="remark" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListTow.' + scope.$index + '.remark'" label-width="0" :rules="rulesTow.remark" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.remark"
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.remark}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('common.text.operation')" fit width="150">
          <template slot-scope="props">
            <el-button type="text" v-if="!props.row.flag" :disabled="compile=='审核'||compile=='查看'"   @click="internAssignment(props.row,props.$index, 'tow')">{{$t('projectDeclara.save')}}</el-button>
            <el-button type="text" v-if="props.row.flag" :disabled="compile=='审核'||compile=='查看'"  @click="submitResults(props.row,props.$index, 'tow')">{{$t('projectDeclara.compile')}}</el-button>
            <el-button type="text" v-if="props.row.flag" :disabled="compile=='审核'||compile=='查看'"  @click="selectEvalResubmit(props.row,props.$index, 'tow')">{{$t('projectDeclara.delete')}}</el-button>
          </template>
        </edu-table-column>
      </edu-table>
      <h2 style="color:#101010" >{{$t('projectDeclara.studentFee')}}</h2>
      <edu-table
        :pagination="false"
        :order="false"
        :selection="false"
        :tooltipEffect="tooltipEffect"
        stripe
        :data="queryForm.studentListSan"
        size="mini"
      >
        <edu-table-column :label="$t('projectDeclara.preparing')" prop="personnelCost" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListSan.' + scope.$index + '.personnelCost'" label-width="0" :rules="rulesSan.personnelCost" >
                <el-input  :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.personnelCost"
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.personnelCost}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.jobContent')" prop="workContent" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListSan.' + scope.$index + '.workContent'" label-width="0" :rules="rulesSan.workContent" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.workContent"
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.workContent}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.money')" prop="budget" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListSan.' + scope.$index + '.budget'" label-width="0" :rules="rulesSan.budget" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.budget"
                    clearable
                    maxlength="9" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.budget}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('projectDeclara.estimatBasis')" prop="remark" >
          <template slot-scope="scope">
              <el-form-item v-if="!scope.row.flag" style="margin-top: 15px;" :prop="'studentListSan.' + scope.$index + '.remark'" label-width="0" :rules="rulesSan.remark" >
                <el-input :disabled="compile=='审核'||compile=='查看'"
                    v-model.trim="scope.row.remark"
                    clearable
                    maxlength="64" >
                </el-input>
              </el-form-item>
              <span v-else>{{scope.row.remark}}</span>
          </template>
        </edu-table-column>
        <edu-table-column :label="$t('common.text.operation')" fit width="150">
          <template slot-scope="props">
            <el-button type="text" v-if="!props.row.flag" :disabled="compile=='审核'||compile=='查看'"   @click="internAssignment(props.row,props.$index, 'san')">{{$t('projectDeclara.save')}}</el-button>
            <el-button type="text" v-if="props.row.flag"  :disabled="compile=='审核'||compile=='查看'"  @click="submitResults(props.row,props.$index, 'san')">{{$t('projectDeclara.compile')}}</el-button>
            <el-button type="text" v-if="props.row.flag" :disabled="compile=='审核'||compile=='查看'"  @click="selectEvalResubmit(props.row,props.$index, 'san')">{{$t('projectDeclara.delete')}}</el-button>
          </template>
        </edu-table-column>
      </edu-table>
      <el-form-item :label="$t('projectDeclara.calculati')">
        <el-input type="textarea" :disabled="compile=='审核'||compile=='查看'" :rows="4" v-model="queryForm.textarea.remark"  maxlength="500"></el-input>
      </el-form-item> -->
    </el-form>
  </div>
</template>
<script>
import elTableList from './elTableList'
export default {
  components: {
    elTableList
  },
  props: {
      compile: {
          type: String,
          default: ''
      },
      compiles: {
          type: String,
          default: ''
      },
      compileList: {
          type: String,
          default: ''
      },
      dataList: {
          type: Object,
          default: () => {}
      },
      requireInput: {
          type: Boolean,
          default: true
      }
  },
  data() {
    let cannotEnter = (rule, value, callback) => {
        let reg = /[`$]/im
        if (reg.test(value)) {
            return callback(new Error(this.$t('identificationToDoList.cannotContain')))
        } 
        return callback()
    }
    return{
      fileList: [],
      images: 'static/images/icon/icon-help.png',
      labeList: '',
      options: {
        faculty: [],
        country: [],
        nameSchool: []
      },
      queryForm: {
          textarea: {
            firstType: 1,
            remark: ''
          },
          tableList: [
            { label: this.$t('projectDeclara.expenditure'), value: 0, title: '校内人员的评审费、命题费、阅卷费、监考费，承办竞赛组织筹备工作劳务费。参照学校标准。请列支工作内容，并列支测算依据，竞赛指导工作量需制定指导计划并说明是集中开班指导或为点评答疑。（此部分内容重要，请认真按需如实填写，预算未做或不详在下一年预算分配中不予考虑）'},
            { label: this.$t('projectDeclara.personnel'), value: 0, title: '校外人员（非同济大学人员）的评审费、命题费、阅卷费、监考费，承办竞赛组织筹备工作劳务费。参照学校标准。'},
            { label: this.$t('projectDeclara.studentFee'), value: 0, title: '支付给学生的劳务酬金。 参照学校研究生三助或勤工助学标准。（不得用于发放获奖学生奖励金）'}
          ],
          list: [],
        // condition: {
          studentListOne: [
            { personnelCost: '', workContent: '', remark: '', planBudget: null, flag: false,firstType: 1, secondType: 1 }
          ],
          studentListTow: [
            { personnelCost: '', workContent: '', remark: '', planBudget: null, flag: false,firstType: 1, secondType: 2 }
          ],
          studentListSan: [
            { personnelCost: '', workContent: '', remark: '', planBudget: null, flag: false,firstType: 1, secondType: 3 }
          ],
        // },
       
      },
      valFee: 0,
      rulesOne: {
        personnelCost: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        workContent: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        remark: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        budget: [
          { validator: this.validateWeight, trigger: 'blur' }
        ]
      },
      rulesTow: {
        personnelCost: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        workContent: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        remark: [
          { validator: cannotEnter, trigger: 'blur' }
        ],
        budget: [
          { validator: this.validateWeight, trigger: 'blur' }
        ]
      },
      rulesSan: {
        personnelCost: [
          { required: true, validator: cannotEnter, trigger: 'blur' }
        ],
        workContent: [
          { required: true, validator: cannotEnter, trigger: 'blur' }
        ],
        remark: [
          { required: true, validator: cannotEnter, trigger: 'blur' }
        ],
        budget: [
          { validator: this.validateWeight, trigger: 'blur' }
        ]
      },
      
      compileEdit: '',
      dialogVisible: false,
      restaurants: [],
      semester: [],
      semesterRmpor: [],
      multipleSelection: [],
      index: '',
      tableData: []
    };
  },
  filters: {
    collegeAcademyList(val, array) {
      let str = "";
      for (let item of array) {
        if (val === item.value) {
          str = item.label;
        }
      }
      return str;
    }
  },
  destroyed(){
    // 在页面销毁后，清除计时器
    clearInterval(this.setIntervalDate); //清除计时器
  },
  methods: {
    setIntervalDate() {
      setInterval(() => {
        this.changeTbel()
        this.calculateMoney()
      }, 1000)
    },
    // 打开弹框
    btnAssignment(index,label) {
      this.labeList = label
      this.index = index
      if(index==0) {
        if (this.queryForm.studentListOne.length<10) {
          for (let index = this.queryForm.studentListOne.length; index < 10; index++) {
            this.queryForm.studentListOne.push({ personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 1 })
          }
        }
        this.tableData = this.queryForm.studentListOne
      } else if (index==1) {
        if (this.queryForm.studentListTow.length<10) {
          for (let index = this.queryForm.studentListTow.length; index < 10; index++) {
            this.queryForm.studentListTow.push({ personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 2 })
          }
        }
        this.tableData = this.queryForm.studentListTow
      } else {
        if (this.queryForm.studentListSan.length<10) {
          for (let index = this.queryForm.studentListSan.length; index < 10; index++) {
            this.queryForm.studentListSan.push({ personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 3 })
          }
        }
        this.tableData = this.queryForm.studentListSan
      }
      this.dialogVisible = true
    },
    changeAddMore(data) {
      this.tableData = data
    },
    // 添加更多
    addMore() {
      this.$refs.table.addMore()
      if(this.index==0) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 1 }
        )
      } else if (this.index==1) {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 2 }
        )
      } else {
        this.tableData.push(
          { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 3 }
        )
      }
    },
    handleClose() {
      this.tableData = []
      this.dialogVisible = false
    },
    // 弹框确定
    confirm() {
      this.$refs.table.calculateMoney()
      this.$refs.table.changeTbel()
      this.dialogVisible = false
      this.calculateMoney()
      this.changeTbel()
    },
    valFeeClick(num,index) {
      this.queryForm.tableList[index].value = num
    },
    // 点击计算某行金额
    changeClick(data,index) {
      if(index==0) {
        this.queryForm.studentListOne = data
      } else if (index==1) {
        this.queryForm.studentListTow = data
      } else {
        this.queryForm.studentListSan = data
      }
     
    },
    validateWeight(rule, value, callback) {
      if (value > 0) {
        // let expReg = /^([1-9][0-9]*)+(.[0-9]{1,2})?$/
        let expReg = /^[1-9]$|^([0-9])+(.[0-9]{1,2})?$/
        if (!expReg.test(value)) {
          callback(new Error(this.$t('projectDeclara.decimalPlace')))
        } else {
          callback()
        }
      } else {
        callback(new Error(this.$t('projectDeclara.decimalPlace')))
      }
    },
    // 保存
    internAssignment(data, index, num) {
      let expReg = /^[1-9]$|^([0-9])+(.[0-9]{1,2})?$/
      if (!expReg.test(data.budget)) {
        this.$set(data, 'budget', null)
      } 
      let reg = /[`$]/im
      if (reg.test(data.personnelCost)) {
        this.$set(data, 'personnelCost', '')
      } 
      if (reg.test(data.workContent)) {
        this.$set(data, 'workContent', '')
      }
      if (reg.test(data.remark)) {
        this.$set(data, 'remark', '')
      }
      if (data.personnelCost&&data.workContent&&data.budget&&data.remark) {
        this.$set(data, 'flag', true)
        if (this.compileEdit !== '编辑') {
          if (num === 'one') {
            this.queryForm.studentListOne.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 1 }
            )
          } else if (num === 'tow') {
            this.queryForm.studentListTow.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 2 }
            )
          } else {
            this.queryForm.studentListSan.push(
              { personnelCost: '', workContent: '', remark: '', budget: null, flag: false,firstType: 1, secondType: 3 }
            )
          }
        } else {
          this.compileEdit = ''
        }
        this.changeTbel()
        this.calculateMoney()
      } else {
        return this.$message.warning('请检查数据是否填写完整')
      }
      
    },
    changeTbel() {
      // if (this.queryForm.studentListSan.length > 1 || this.queryForm.studentListTow.length > 1 || this.queryForm.studentListOne.length > 1) {
        this.queryForm.list = this.queryForm.studentListSan.concat(this.queryForm.studentListTow,this.queryForm.studentListOne)
        this.$emit('changeTab', this.queryForm)
      // }
    },
    // 编辑
    submitResults(data, index, num) {
      this.compileEdit = '编辑'
      this.$set(data, 'flag', false)
      this.changeTbel()
      this.calculateMoney()
    },
    // 删除
    selectEvalResubmit(data, index, num) {
      this.$delConfirm().then(() => {
        if (num === 'one') {
          this.queryForm.studentListOne.splice(index,1)
        } else if (num === 'tow') {
          this.queryForm.studentListTow.splice(index,1)
        } else {
          this.queryForm.studentListSan.splice(index,1)
        }
        this.changeTbel()
        this.calculateMoney()
      }).catch(() => {
        this.$message({
          type: 'info',
          message: this.$t('internship.cancelOpera')
        });  
      });
      
    },
    calculateMoney() {
      this.valFee = 0
      this.queryForm.tableList.forEach((el, index) => {
        if (el.value && index !== 0) {
          this.valFee+=Math.round(Number(el.value.toFixed(2))*100)/100 
        }
      })
      Math.round(this.valFee.toFixed(2)*100)/100
      this.$emit('change-valFee',this.valFee)
    }
  },
  mounted() {
    if (this.dataList.planBudgetListOne.length>0) {
        // this.tableData = this.dataList.budgetListOne
        let studentListOne = []
        let studentListTow = []
        let studentListSan = []
        this.dataList.planBudgetListOne.forEach(el => {
          // let eltd = el.personnelCost&&el.budget&&el.remark
          if (!el.secondType) {
            this.queryForm.textarea.remark = ''
          }
          // if (eltd) {
            if (el.firstType==1&&el.secondType==1) {
              studentListOne.push(el)
              
            }
            if (el.firstType==1&&el.secondType==2) {
              studentListTow.push(el)
              
            }
            if (el.firstType==1&&el.secondType==3) {
              studentListSan.push(el)
              
            }
          // }
        })
        this.queryForm.studentListOne = studentListOne
        this.queryForm.studentListTow = studentListTow
        this.queryForm.studentListSan = studentListSan
        this.valFee = 0
        let one = 0
        let tow = 0
        let three = 0
        this.queryForm.studentListOne.forEach(el => {
          if (el.budget) {
            one+=Number(el.budget) 
          }
        })
        this.queryForm.tableList[0].value = one
        this.queryForm.studentListTow.forEach(el => {
          if (el.budget) {
            tow+=Number(el.budget) 
          }
        })
        this.queryForm.tableList[1].value = tow
        this.queryForm.studentListSan.forEach(el => {
          if (el.budget) {
            three+=Number(el.budget) 
          }
        })
        this.queryForm.tableList[2].value = three
        // this.valFee += one + tow + three
        this.valFee += tow + three
        Math.round(this.valFee*100)/100
        this.$emit('change-valFee',this.valFee)
        // this.$nextTick(() => {
        //   if (this.compile!='审核'||this.compile!='查看') {
        //     this.setIntervalDate()
        //   }
        // })
    }
    this.$nextTick(() => {
      if (this.compile!=='审核'||this.compile!=='查看') {
        this.setIntervalDate()
      }
    })
    // if (this.dataList) {
    //   if (this.compile=='编辑') {
    //     if (this.compiles=='任务书') {
    //       return this.dataList = null
    //     }
    //     if (this.compileList == '学校编辑') {
    //       if (this.dataList.planBudgetListOne.length>0) {
    //         this.dataList.planBudgetListOne.forEach(el => {
    //           if (!el.secondType) {
    //             this.queryForm.textarea.remark = el.remark
    //           }
    //           if (el.firstType==1&&el.secondType==2) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListTow.unshift(el)
    //           }
    //           if (el.firstType==1&&el.secondType==3) {
    //             this.$set(el, 'flag', true)
    //             this.queryForm.studentListSan.unshift(el)
    //           }
    //         })
    //         this.valFee = 0
    //         let tow = 0
    //         let three = 0
    //         if (this.queryForm.studentListTow.length > 0) {
    //           this.queryForm.studentListTow.forEach(el => {
    //             if (el.budget) {
    //               tow+=Number(el.budget) 
    //             }
    //           })
    //         } 
    //         if (this.queryForm.studentListSan.length > 0) {
    //           this.queryForm.studentListSan.forEach(el => {
    //             if (el.budget) {
    //               three+=Number(el.budget) 
    //             }
    //           })
    //         }
    //         this.valFee +=tow+three
    //         Math.round(this.valFee*100)/100
    //         this.queryForm.list = this.queryForm.studentListSan.concat(this.queryForm.studentListTow)
    //         this.$emit('changeTab', this.queryForm)
    //         this.$emit('change-valFee',this.valFee)
    //       }
    //     } else {
    //       if (this.dataList.planBudgetListOne.length>0) {
    //         this.dataList.planBudgetListOne.forEach(el => {
    //             if (!el.secondType) {
    //               this.queryForm.textarea.remark = el.remark
    //             }
    //             if (this.compiles!=='任务书') {
    //               if (el.firstType==1&&el.secondType==1) {
    //                 this.$set(el, 'flag', false)
    //                 this.queryForm.studentListOne.unshift(el)
    //                 this.queryForm.studentListOne.splice(-1,1)
    //               }
    //             }
    //             if (el.firstType==1&&el.secondType==2) {
    //               this.$set(el, 'flag', false)
    //               this.queryForm.studentListTow.unshift(el)
    //               this.queryForm.studentListTow.splice(-1,1)
    //             }
    //             if (el.firstType==1&&el.secondType==3) {
    //               this.$set(el, 'flag', false)
    //               this.queryForm.studentListSan.unshift(el)
    //               this.queryForm.studentListSan.splice(-1,1)
    //             }
    //           })
    //         this.calculateMoney()
    //       }
    //     }
    //   } 
    //   if (this.compile=='审核'||this.compile=='查看') {
    //     this.dataList.planBudgetListOne.forEach(el => {
    //       if (!el.secondType) {
    //         this.queryForm.textarea.remark = el.remark
    //       }
    //       if (this.compiles!=='任务书') {

    //         if (el.firstType==1&&el.secondType==1) {
    //           this.$set(el, 'flag', false)
    //           this.queryForm.studentListOne.unshift(el)
    //           this.queryForm.studentListOne.splice(-1,1)
    //         }
    //       }
    //       if (el.firstType==1&&el.secondType==2) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListTow.unshift(el)
    //         this.queryForm.studentListTow.splice(-1,1)
    //       }
    //       if (el.firstType==1&&el.secondType==3) {
    //         this.$set(el, 'flag', false)
    //         this.queryForm.studentListSan.unshift(el)
    //         this.queryForm.studentListSan.splice(-1,1)
    //       }
    //     })
    //     this.valFee = 0
    //     let one = 0
    //     let tow = 0
    //     let three = 0
    //     if (this.queryForm.studentListOne.length > 0) {
    //       this.queryForm.studentListOne.forEach(el => {
    //         if (el.budget) {
    //           one+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListTow.length > 0) {
    //       this.queryForm.studentListTow.forEach(el => {
    //         if (el.budget) {
    //           tow+=Number(el.budget) 
    //         }
    //       })
    //     } 
    //     if (this.queryForm.studentListSan.length > 0) {
    //       this.queryForm.studentListSan.forEach(el => {
    //         if (el.budget) {
    //           three+=Number(el.budget) 
    //         }
    //       })
    //     }
    //     this.valFee += one+tow+three
    //     Math.round(this.valFee*100)/100
    //     this.$emit('change-valFee',this.valFee)
    //   }
    // }
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.personal {
	border-collapse: collapse;
	border: 1px solid #000000;
	margin: 20px;
	td,
	th {
		line-height: 30px;
		border-collapse: collapse;
		border: 1px solid #a5a5a5;
		background: #fff;
		color: #606266;
	}
	label {
		color: #999;
    }
    .courseTemplate-td1 {
       width:20%;
       background: #F5F7F9;
       text-align: center;
    }
    .courseTemplate-td2 {
       width:20%;
       background: #fdfeff;
       text-align: center;
    }
}
.p_cals:hover{
  cursor: pointer;
  color: #409eff;
}
.p_cals{
  color: #aaa
}
.inner-breadcrumb {
    .breadcrumb {
        span {
            font-weight: normal;
            color: #aaa;
        }
        a {
            font-weight: normal;
            color: #aaa;
        }
        a:hover {
            color: #409eff;
        }
        .last {
            font-weight: bold !important;
            cursor: default !important;
        }
        .disable {
            cursor: default !important;
        }
    }
}
.condition-title-p {
    font-weight: 400;
    font-style: normal;
    color: #2b3b4e;
    font-size: 18px;
    margin-bottom: 15px;
}
.base-info-title {
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    color: #2b3b4e;
}
.table-style-baseinfo {
    background-color: rgba(210, 212, 214, 1);
    box-sizing: border-box;
    border-width: 0.5px;
    border-style: solid;
    border-color: rgba(210, 212, 214, 1);
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    width: 100%;
    font-weight: 401;
    font-style: normal;
    font-size: 14px;
    color: #8896a7;
    margin-bottom: 20px;
}

.table-style-baseinfo td {
    width: 25%;
    background-color: rgba(255, 255, 255, 1);
    border: none;
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-weight: 401;
    font-style: normal;
    font-size: 14px;
    color: #2b3b4e;
    height: 32px;
    padding: 0 10px;
}

.table-style-baseinfo .text-right-background-color {
    background-color: #fdfeff4d;
    text-align: right;
}

.text-left-background-none {
    text-align: left;
}
</style>